home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
escalant
/
escala21.lha
/
escalante2.1
/
README
< prev
Wrap
Text File
|
1993-07-14
|
20KB
|
476 lines
The Esclanate system is an environment for specifying and generating
visual language environments for graph model based visual languages
(e.g. nodes and edges). There are three major components to the system,
base language module, generic editor, specification system.
The language module is a type hierarchy that provides the base classes
for the various components of the language. These include structural
and visual language constructs (e.g. nodes and edges) and a set of
structured graphics objects, Gfx.... .
The generic editor provides a wide range of language editing functions.
One can easily have multiple views, subgraphs, etc.
The specification system, GrandView, supports the specification and generation
of the constructs of a target visual language. You define
the constructs of the target language as well as the attributes, image,
behavior, etc of those constructs. The spec system dumps out
the code that realizes the target language.
Escalante is built using the ET++ toolkit. This toolkit is available
via anonymous ftp from iamsun.unibe.ch in C++/ET++/et3.0-alpha.1.tar.Z.
The alpha version has some bugs and I am waiting for the release of
the beta version (which is supposed to happen any time).
I'd like to keep track of who is using Escalante so if you
could email at jeffm@cs.colorado.edu I'd appreciate it.
###########################################################################
About the system name:
After working forever without a nifty acronymic name I finally hit upon
both some nifty acronyms as well as tying the names into an area that
is near and dear to me, SE Utah, the canyon country. Escalante was a 18th
century Spanish priest/explorer who wandered through SE Utah ~1776.
The Escalante river is named after him and was the last river to be mapped
in the lower 48 states. An amazing area!!
###########################################################################
Bugs:
There are NO bugs :-) Actually there are probably alot of bugs but
the system has been in use for a while by me and some others and things
are gradually getting cleaned up. There are probably memory leaks all
over the place, some intentional some not. Also the fonts are limited
in the ET++ toolkit so font specs like underlining, outlining, etc don't
work.
IO:
One feature that is not a bug is the speed in which graphs are loaded
and saved. Sometimes it takes more than a few seconds. The way the toolkit
does object IO and how many objects there can be makes for at times
slow going. So... have patience.
Menus:
A couple of things about the menus that appear as part of a graph element.
First (and this is a toolkit bug) if where you end up on the menu is over a
different window then where the menu appears the menu entry won't get set.
So just hide the other window or move the window.
It also takes a second or two to catch the menu entry and set it. If you pulldown
a menu and move the mouse right after you choose a menu entry it probably won't
catch it. So, have a touch of patience when using menus.
!!!!!BAD BUG!!!!!
For some reason in the ET++ toolkit when you try to open a window when
a mouse button is down EVERYTHING (and I mean everything) locks up, screen,
keyboard, mouse. If this happens you need to go and kill the process.
I am hoping this will be fixed in the next release of the toolkit but I have
hacked a fix in the local et++ source. If you grab another copy
of et++ then change the line in the method XSERVER/XWindowPort::DevShow()
From this:
XMaskEvent(XWinSystem::display, StructureNotifyMask | ExposureMask | ButtonPressMask | ButtonReleaseMask, &xe);
To this:
if(down)
OpenNotify(portrect);
else {
XMaskEvent(XWinSystem::display, StructureNotifyMask | ExposureMask | ButtonPressMask | ButtonReleaseMask, &xe);
MapEvent(xe, &t);
}
This fix doesn't seem to cause any problems.
Loading a file into the system when you're already running is a little buggy.
The old views are removed and new views are created. When you do an Open
you cannot save any pre-existing views/graphs. Only the newly opened one.
Actually, if you do a Save after doing an Open you will get the original
objects from the Open plus any other objects added from any other views.
So, it is best to limit the use of Open.
The color map gets screwed up after doing a Print. This is a toolkit problem
(I think). I think if the print dialog is not over a window then you're ok.
For bug reports or other worthwhile queries email:
jeffm@cs.colorado.edu
##############################################################################3
Building and using the Escalante system.
I think if you can get ET++ to build then there won't be any problem
with Escalante. I have built ET++ and Escalante with g++2.2.2 on a
sparc and have had no problems.
Once you've got ET++ installed and built you can now go about building
Escalante.
You can configure the system by setting some -D flags in
src/ALL/Makefile. This lets you build the system with or
without various functional aspects.
The following should be placed in your .cshrc:
------------------ Cut Here ----------------------
######## Escalante and ET++ stuff ####################
setenv ESCALANTE_DIR path of this directory
setenv ET_DIR Where you put the et++ directory
setenv ESCALANTE_CC ${ET_DIR}/bin/etCC
set path = ($ESCALANTE_DIR/bin $path )
#-------------------------------------------------
You will also want to add the ET++ font directory to your font path so
put this in your .xinitrc:
xset +fp $ET_DIR/xfonts
xset fp rehash
Copy the file ESCALANTE_DIR/ETRC to your home directory. The ET++ toolkit looks there.
The important things to change here is the entry that defines
where to look for bitmaps. The default path is ESCALANTE_DIR/images
but you can add an extra path in the ETRC:
*.Escalante.ImagePath: /Some/Path
Now just run build in the ESCALANTE_DIR directory. This makes clean and include,
builds the library and then builds the applications in the apps directory
(including the GrandView environment).
Ths Escalante directory is composed of the following directories:
src: Contains a set of directories (util, gm, sgm, vgm , editor, gfx, ALL)
that provide the base system.
incl: Contains symbolic links to the include files in src/*
lib: Contains the main system library liball.o
images: Bitmaps used by the system.
bin: Contains executables, (e.g. GrandView), and some scripts and prototype
files used by GrandView.
doc: Some documentation. misc.doc has some general information. escalante.ps
is a ps file of a yet to be published paper describing the general concepts
underlying Escalante (though nothing about the GrandView).
apps/GrandView:
This is the specification editor. When running this it's best to start in
an empty directory somewhere because the spec editor dumps out a
bunch of code. There is an entry in the ETRC file called
*.GrandView.TargetName: MyTest
Set this to what you want your generated system to be called.
The help menu has descriptions of the various views and commands
in the editor.
In the tar tape EscalanteDemos.tar.Z there is a directory containing a bunch of
demo programs I have built.
Dataflow: This lets you string nodes together and calculate
values. The ComplexValue node has a pull down menu entry to define
an operator (e.g. +, *, /, etc.)
GfxExample: This has some examples that show different graphical
representations. Add elements to the clock and their value is changed.
The globes show a animated set of bitmaps.
Miro: A multiple view example of the Miro instance language,
a visual language taken from the literature. This example shows
multiple visual representations of the same
underlying structural graph. When adding an element in one window
a corresponding element of some other type is added in the other
window. The edge type in one window causes containment. The other
edge type causes a simple hierarchical layout. Typing in the text
field of one node causes that value to be propagated to the
corresponding node.
Verdi: Another example taken from the literature. Under the View/Views
menu do a new view/new element. Pick on a Role object. Up pops another
view with the subgraph of the Role.
Mobile: This is a prototype of extensions to a workflow system.
This system also exhibits multiple representations. One can
add and/or/task nodes. A role node sweeps out an area and a relation
is added between the role and any and/or/task nodes within the area.
This relation defines containment. One can add tokens to an and/or/task
node using the Mobile/IncDec token menu entry. LMB inc, MMB dec. Notice
the different representation of the number of tokens in each view.
One can simulate the graph by hitting the run or the step button.
An actor node must be attached to the role node of an and/or/task
node for the and/or/task node to fire.
Circuit: This is a simple circuit diagram editor. You can assemble
a circuit together and change input values thru the On/Off node.
A lighbulb can be used to display the output of a gate. There are no
rules for max or min number of inputs for a gate.
The following demos are very dynamic active environments (toys).
Guns: This application lets you fire "Bullets" from a "Gun".
A gun is added through the Guns menu. A gun can be aimed and fired.
You can set a velocity and an increment that is added to the velocity
after every firing. The top sliders allow you to set a gravity in the X and Y
direction. You can also fire a Bomb. Bombs shoot out bullets in a circular
pattern;
The Waterworks, Blocks and Party demos were inspired by Alex Repenning's AgentSheets work.
The Turing application is inspired by both Agentsheets and Bell's ChemTrains work.
The dynamic behavior of these applications is turned on/off through
the "application name" menu entry.
Waterworks: This application lets you assemble pipes, faucets, water drops,
water vapor etc. into a dynamic waterworks system. You can turn on/off
the clock through the Waterworks menu. When a pipe fills up it turns red.
You can adjust the capacity and amount of water. A water drop falls down until
it hits some object. If the object cannot take water from the top then the
droplet turns into vapor. Vapor rises until it hits something and then condenses
to droplet form. An umbrella catches water droplets and vapor and sheds the drops
to the right and left (if it can). A rock does not take water from anywhere and
just splashes it. A faucet is a source of water. You can increment/decrement the
rate at which the faucet drips and the amount of water that is dripped.
A kettle is just like a faucet except it is a source of water vapor.
Blocks: This application is made up of bricks, blocks, balls and killers.
Turn the clock on in the Blocks menu. Bricks just sit where they are. Blocks
fall until they hit something. Balls fall until they hit something. If there is
space to the right or left a ball will roll. A killer falls. Anything in its
path is killed and a splat is left behind.
Party: There are two incarnations of this application which can be controlled
by an entry in the ETRC. Both applications involve setting up a room full of people.
The first application consists of Happy people, Grumpy people, Wall Flowers and
Wanderers. Hap[py people are attracted to all others and move accordingly. Grumpy
people are repulsed by all others and try to move away. Wanderers randomly wander
about the room. Wall Flowers cling to the nearest wall.
The second incarnation of the Party application consists of people of different
"races". Here the races are the Disneys, the Flintstones and the Garfields. One
can set the mutual attratcion/repulsion between the races in the ETRC.
Turing: This is an application that lets you create a Turing machine.
You can add a series of tape elements and a head over the tape elements.
You can add loose rules through the palette or tabular rules through the
Turing menu. A rule consists of a Head value, Tape value, new head value, new tape
value and a direction. The values in the Head, Tape and Rules are textual strings
and can be set directly through the text fields. A head tries to match its value
and the value of the tape element it is over with one of the rules. This matching
is by regular expressions. When a matching rule is found the values for the tape
and head are set to those defined in the rule. If the new value is "-" then no change
occurs. If the new tape value is "\h" then the previous head value is used. If the
new head value is "\t" then the tape value is used. Else whatever is there is used.
The list of rules can be moved around. You can have any number of heads on any
number of tapes.
Running things:
The systems built with Escalante are modeful. i.e. You are in some
mode all of the time. The system does not revert to a default mode
after doing something (ala MacDraw). Also it is verb/noun oriented.
You first pick some function, e.g. delete, and then go off and delete
the objects. You can group a set of objects and operate on them using Delete Group,
Move Group, etc.
Buttons:
Generally speaking, objects are picked with the
left mouse button. When adding a relation (e.g. edge), LMB to pick tail,
any number of MMB for joints, LMB for picking head.
By default, unless the mode you are in uses the middle mouse button,
the middle mouse button moves objects. With the Control key depressed
the MMB reshapes objects.
Some commands have you draw a rectangle on the screen (e.g. picking a group).
To do this you LMB Down/ Move/ LMB Up. You can clear the rectangle using the
Edit/Pick/Clear Rectangle menu entry.
The following are descriptions of commands in the Edit menu:
Copy Element: Pick an element. Successive LMB adds a copy of that element
to the graph.
Copy Element to Palette: Pick an element and place it into the palette.
Edit/Pick: Commands to pick single elements of particular types and
pick groups of elements of particular types. Also draw and clear the
rectangle.
The commands in the Edit/Move menu, Move, Reshape and Move Point, alter
the position and/or shape of an element. LMB performas the regular command.
MMB constrains the move to either the X or the Y direction. The Meta key
pressed causes the command to act on all visual elements associated with the
picked element (i.e. those having a common SGraphElement). Reshape moves the
nearest point (N, NE, E, SE, S, SW, W, NW, CTR). Move Point moves the nearest
point P1 or P2. The Control key pressed cause the Reshape and Move Point commands
to act on both the picked point and on the opposite of the picked point.
The Quick Move command lets you pick an element and then pick a point to
move the element to. There is no feedback.
Move group lets you move the current picked group to a point.
Push Out lets you define a rectangular area on the screen. All elements
pushed out from that area. Pull In does the opposite.
To Front/To Back lets you move an element to the front(back) to hide
or see elements that obscure one another.
Edit/Joints: You can maniupl;ate individual joints with the commands here.
Typically you need to first pick the element whose joints are to be maniuplated.
Then perform the command any number of times on that element.
Edit/Gfx: The entries in this menu lets you manipulate the individual Gfx objects
(e.g. Rectangle, Bitmap, etc.) that make up the image of an element.
Edit/Align: These commands lets you align and layout the elements in the currently
picked group. The ____At commands lets you pick a point. The others commands just do
their stuff when you pick them from the menu.
Edit/Scale: Scale up or down. Shrink to a minimum.
Turn Off Visibility: Turn an element off. Caution: There might not be
a way to turn back on.
Edit/Relation: This menu contains a bunch of commands concerning relations.
You can remove and set the Tail or Head element. YOu can also turn On/Off
the event dependencies.
The View Menu has commands for dealing with the view.
View/Views has commands for making new views and going to new graphs
with the current view.
The View/Flags lets you set various flags that govern event propagation,
sending input to widget Gfx, rubber banding while adding relations,
sending move commands to all velements of a common selement and checking
if a tail(head) is ok for a relation.
You can also turn on a grid to warp points to.
The Multiples On entry controls whether you add multiple elements
while the mouse is down. It is best to have the grid on when multiples
are on.
Undo/Redo:
Escalante supports undo/redo of moves, reshapes, adding and deleting.
This is done twith the right mouse button.
It should support n level undo/redo but something crashes (I think in ET++).
So it's best to stay with 1 level. (The level can be set in ETRC).
Widgets:
The image of elements of a visual language can contain widgets (e.g. buttons,
menus, text views, etc.). In general, the cursor changes to a thin cross
when over such a widget. To type into a field you click on the field (LMB)
to set the focus. Leave the mouse there and type. When the mouse is moved
the field is no longer the focus. The Undo/Redo Typing command and
Cut/Copy/Paste do not work.
ETRC:
Within the ETRC file you can set various flags to configure the system at runtime.
There are ET++ things as well as Escalante things. This is described in the ETRC.
GrandView:
Once you have things built you can use the GrandView editor to specify
specific languages and generate systems for those languages. The
best thing to do is go to an empty directory. Run GrandView
from this directory. Two windows are created. The specification and the
prototype views. The Help menu entry provides online help that describes the
view you are in and various commands available. That is probably a good place
to start. I have tried to make GrandView easy to use and amenable to exploring
your language specification.
I have never been good at naming things (with Escalante the exception). You can consider
Entities as nodes and Relations as edges. The ClassView in GrandView allows you to define
a hierarchy of entity and relation classes. (You can ignore the Structural Entity
and Structural Relation, those are used when there are multiple visual graphs e.g.
Miro, Mobile).
You can prototype the classes you have specified using the GrandView/Add Prototype
menu entry. GrandView creates objects in the Prototype view that have as
much functionality as possible (without compiling).
GrandView generates code from your specification and using
the GrandView/Make Everything menu command writes out the .C and .h files,
runs the scripts in the bin directory and produces out a working editor.
There are two general types of files the spec editor spits out.
First is the set of .C and .h files which are the language class definitions
you define in the editor. The GrandView.TargetName.[Ch] files (e.g. MyTest.[Ch])
is the editor. These are generated from generic files using the gen.sed script.
These files are heavily commented. Look for the IMPORTANT commented methods. These
methods are the major methods used in the editor.
Included in MyTest.[Ch] are generated files called *HS* which set up hide/show
functionality based on object type. Also there is a set of files *Action* which
are generated in the Action View of the spec editor. These files set up menu
commands in MyTestView (in MyTest.C).